const fs  = require('fs');
const files = fs.readdirSync('./test');
let num = 1;
files.forEach(item => {
    console.log(item);
    let res = num + '-' + item;
    num++;
    console.log(res);
    fs.renameSync(`./test/${item}`,`./test/${res}`);
})